package com.rmondjone.androidcamerademo

import android.view.View
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

/**
 * copyright：
 * @author：anthui creation date： .
 * @since: 1.0.0
 * @describe:
 */
class TypeAdapter : BaseQuickAdapter<TypeBean, BaseViewHolder>(R.layout.item_list_type) {

    var itemCheckPosit = 0

    override fun convert(helper: BaseViewHolder, item: TypeBean) {

        helper.setText(R.id.tv_content, item.name)
        helper.getView<View>(R.id.tv_content).isSelected = itemCheckPosit == helper.adapterPosition

    }
}